// 获取全局应用程序实例对象
const app = getApp();
const {get,post} = app.utils.request;
const {user_order_info} = app.utils.config;

// 创建页面实例对象
Page({
	// 页面的初始数据
	data: {
		title: '申请退款',
		order: {},
		uploadCount: 6
	},

	// 生命周期函数--监听页面加载
	onLoad(options) {
		const that = this;
		const {id} = options;
		post({path: `${user_order_info}`}, {order_id: id})
		.then((res) => {
			if (res.ret == 0) {
				console.log(res.data);
				that.setData({
					order: res.data,
					order_id: id
				});
			}
		});
	},

	// 页面分享设置
	onShareAppMessage() {
		return {
			title: 'share title',
			path: 'pages/refund/refund',
		};
	},

	uploadCallback(evt){
		console.log(evt);
	}
});
